home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT12 / TESTALT.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  556 b   |  17 lines

  1. ;
  2. ;       Program TstAlt ( Chapter 12 )
  3. ;
  4. CODE    segment word public
  5.     assume  CS:CODE
  6.     public  TestAlt         ; entry TestAlt is accessable from other modules
  7. TestAlt Proc    far
  8.     mov     ah,02h          ; function 02h - get keyboard flag
  9.     int     16h             ; BIOS keyboard service
  10.     and     al,8            ; allot bit 3
  11.     mov     cl,3            ; shift to the right by 3 - bit 3 becomes bit 0
  12.     shr     al,cl           ;    bit 3 becomes bit 0
  13.     ret                     ; return to calling program
  14. TestAlt endp    
  15. CODE    ends
  16.     end
  17.